<#include "/common/common.ftl" encoding="UTF-8">
<link href="${staticUrl}/css/list.css" type="text/css" rel="stylesheet" />
<script  src="${staticUrl}/js/table.js" type="text/javascript"></script>
<#assign action = "authority">
<script language="javascript1.2">
    $(document).ready(function(){
      var toolbar = new Toolbar({
        renderTo : 'button',
		//border: 'top',
        items : [{
          type : 'button',
          text : '新建',
          bodyStyle : 'new',
          useable : 'T',
          handler : function(){
          	redirect('${request.contextPath}/security/${action}!input.action');
          }
        },'-',{
          type : 'button',
          text : '删除',
          bodyStyle : 'delete',
          useable : 'T',
          handler : function(){
          	submitForm('${request.contextPath}/security/${action}!remove.action');
          }
        }],
        azable : false
      });
	  toolbar.render();
    });
</script>
</head>
<body scroll="no">
    		<div id="button"></div>
<#-- 根据viaQuery标志判断本页面是否是由通用查询产生 -->	
	<form id="mainForm" action="${request.contextPath}/security/${action}!list.action" method="post">
		<table width="100%" height='95%' border="0" cellpadding="0" cellspacing="0">
		  <tr>
			<td>
				<div class="content">
					<table id="table1" border="1" bordercolor="#777EB4" class="list">
					<thead>
						<tr>
							<th width="5%">序列</th>
							<th width="1%">
								<div align="center"><input type="checkbox" name="selectAll" value="" onclick="CheckAll('idKeys');" title="全选"></div>
							</th>
							<th width="15%"><b>名称</b></th>
							<th width="15%"><b>授权</b></th>
							<th width="44%"><b>资源</b></th>
							<th width="20%"><b>操作</b></th>
						</tr>
					</thead>
						<#assign i=0>
						<#list page.result as domain>
						<#assign i=i+1><#-- 表体内容 -->
						<tr id='${i}'>
							<td align='center'>${page.pageSize*(page.pageNo-1) + i}</td>
							<td>
								<div align="center">
									<input type="checkbox" id="idKeys-${i}" name="idKeys" value="${(domain.id)?if_exists}" unchecked>
								</div>
							</td>	 	
							<td class="black12" ><a href="${request.contextPath}/security/${action}!input.action?id=${(domain.id)?if_exists}">${(domain.name)?if_exists}</a></td> 
							<td class="black12" ><a href="${request.contextPath}/security/${action}!input.action?id=${(domain.id)?if_exists}">${(domain.displayName)?if_exists}</a></td> 
							<td class="black12" ><a href="${request.contextPath}/security/${action}!input.action?id=${(domain.id)?if_exists}">${(domain.resourceNames)?if_exists}</a></td> 
							<td class="black12" ><a href="${request.contextPath}/security/${action}!input.action?id=${domain.id}">修改</a><a href="${request.contextPath}/security/${action}!delete.action?id=${domain.id}">删除</a>
							</td> 
						</tr>
						</#list>
					</table>
				<#-- 分页用的参数 -->
  				<#include "/common/page/pageButtom.ftl" encoding="UTF-8">
				</div>
			</td> 
		  </tr>
		</table>
</form>
</body>
</HTML>